package com.hspedu.polymorphic_.polyparameter;

public class Manager extends Employee{
    private int bonus;

    public Manager(String name, int salary, int bonus) {
        super(name, salary);
        this.bonus = bonus;
    }

    public int getBonus() {
        return bonus;
    }

    public void setBonus(int bonus) {
        this.bonus = bonus;
    }
    public void manage(){
        System.out.println("经理"+getName()+" is managing");
    }
    //重写获取年薪方法

    @Override
    int getAnnual() {
        return super.getAnnual()+bonus;
    }
}
